using JoyfulHomeJourney.BackEnd.Infrastructure.EFCore;
using JoyfulHomeJourney.BackEnd.Infrastructure.Dtos.Responses.Objects;
using JoyfulHomeJourney.BackEnd.Infrastructure.Tools;
namespace JoyfulHomeJourney.BackEnd.Server.Instances.Extends.Responses
{
	public static class PointsProductsExtend
{
		public static ResponsePointsProductsDto ToResponseDto(this PointsProducts entity)
{			return new ResponsePointsProductsDto
			{
				createAt = entity.PpCreateAt,
				createAtStr =Tools.TimeToString(entity.PpCreateAt),
				description = entity.PpDescription,
				id = entity.PpId,
				name = entity.PpName,
				pointsCost = entity.PpPointsCost,
				stock = entity.PpStock,
				updateAt = entity.PpUpdateAt,
				updateAtStr =Tools.TimeToString(entity.PpUpdateAt),
			};
		}
	}
}
